var tgd = tgd || {};
tgd.Contests = tgd.Contests || {};
tgd.Contests.SameGame = tgd.Contests.SameGame || {};
tgd.Contests.SameGame.Solver = tgd.Contests.SameGame.Solver || {};
tgd.Contests.SameGame.View = tgd.Contests.SameGame.View || {};

tgd.Contests.SameGame.Group = function () {
	var _score;
	var _blocks = new Array();

	this.__defineGetter__("Size", function() { return _blocks.length; });
	this.__defineGetter__("Blocks", function() { return _blocks; });
	this.__defineGetter__("Score", function() { return Math.pow(_blocks.length - 1, 2); });

	this.add = function(block) {
		//todo: should I check for dupes?
		_blocks.push(block);
	}

	this.toString = function() {
		return _blocks[0].Code;
	}
}
